package top.roadvast.pdshopping.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import top.roadvast.pdshopping.bean.PdLog;
import top.roadvast.pdshopping.bean.PdOrder;
import top.roadvast.pdshopping.service.LogService;
import top.roadvast.pdshopping.service.OrderService;

import javax.annotation.Resource;

/**
 * @Author 郭泽鹏
 * @Date 2021/12/27 20:12
 * @Version 1.0
 * @Description 日志类控制层
 */
@RestController
public class LogController {
    @Resource
    LogService logService;
    @PostMapping("/save_log/level")
    public String saveLogByLevel(@RequestBody PdLog log) {
        return logService.saveLogByLevel(log);
    }

    @PostMapping("/save_log/all")
    public String saveAllLog(@RequestBody PdLog log) {
        return logService.saveAllLog(log);
    }

    @PostMapping("/save_log/level/user")
    public String saveLogByLevelAndUser(@RequestBody PdLog log) {
        return logService.saveLogByLevelAndUser(log);
    }
}
